package cn.antho.shop.domain;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author director
 * @since 2022-11-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_shop_buy")
public class ShopBuy extends Model<ShopBuy> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 采购商品类型
     */
    private Long type;
    /**
     * 采购商品数量
     */
    private Integer count;

    private Integer state;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ShopBuy{" +
        ", id=" + id +
        ", type=" + type +
        ", count=" + count +
        "}";
    }
}
